<template>
    <div
        style="padding-top: 40px"
        v-loading="pageLoading"
        element-loading-text="正在加载,请稍等"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(0, 0, 0, 0.8)"
    >
        <div style="margin: 5px 10px 30px 15px">
            
            <div>
                <!-- 标题 -->
                <el-row>
                    <el-col :span="12">
                        <h3 class="small-title">竞价记录</h3>
                    </el-col>
                </el-row>

                <!-- 内容 -->
                 <el-row style="margin: 30px 30px 30px 0px">
                    <el-col :span="14">
                        <TableList
                            tableRef="table"
                            ref="multipleTable"
                            :checkBoxEnable="false"
                            :showPagination="true"
                            :data="jjjlllDataList ? jjjlllDataList : []"
                            :listConfig="jjjllResultColConfig"
                            :listLoading="jjjlListLoading"
                        ></TableList>
                    </el-col>
                </el-row>

            </div>



        </div>
    </div>
</template>
<script>
import API from '@/api';
import cloneDeep from 'lodash/cloneDeep';
import TableList from '../../components/TableList';

import { JJJL_RESULT_ITEMS } from './config';

export default {
    components: {
        TableList
    },
    data() {
        return {

            pageLoading: false,
            /* 分页查询数据 */
            pageSize: 10,
            pageNum: 1,
            totalPage: 0,

            //- 竞价记录
            jjjlListLoading: false, // 数据列表显示状态
            jjjllResultColConfig: JJJL_RESULT_ITEMS,
            jjjlllDataList: [], //  数据列表


        };
    },
    mounted() {
        var itemData = this.$route.query.itemData;
        this.getList(itemData.id);
    },

    methods: {
     
        /**
         * 分页器发生改变
         * @param page
         */
        paginationChange(page) {
            this.pageSize = page.pageSize;
            this.pageNum = page.pageNo;
            this.getList();
        },

        getList(id) {
            let params = {};
            params.pageNum = this.pageNum;
            params.pageSize = this.pageSize;
            params.id=id;//产权id

            this.listLoading = true;
            this.loading = true;
            API.iapropertyright.getJjJlList(params).then((res) => {
                this.listLoading = false;
                this.loading = false;
                // if (res.code == '0000') {
                this.totalPage = res.total;
                this.jjjlllDataList = res.result.rows;
                this.$set(this.$refs.multipleTable['pageParams'], 'total', res.total);
                // }
            });
        },

        closePage() {
            this.$router.go(-1);
        }
    }
};
</script>